--
-- Author: yawei.zhu
-- Date: 2018-10-05 16:16:02
--

local WorldBossInfo = class("WorldBossInfo")

function WorldBossInfo:ctor(data)
	if data then
		self:read(data)
	end
end

function WorldBossInfo:read(msg)
	self.bossId = msg.bossID
	self.killed = msg.killed
	self.svrKilledCount = msg.svrKilledCount
	self.speedKilledRank = msg.speedKilledRank
	self.guildKilledRank = msg.guildKilledRank
    self.svrBoxGot = msg.svrBoxGot
    self.speedBoxGot = msg.speedBoxGot
    self.guildBoxGot = msg.guildBoxGot
end

function WorldBossInfo:test()
	local msg = {}
	msg.bossID = 23000304
	msg.killed = true
	msg.svrKilledCount = 10
	msg.speedKilledRank = 4
	msg.guildKilledRank = 5
    msg.svrBoxGot = false
    msg.speedBoxGot = false
    msg.guildBoxGot = false
	self:read(msg)
end

function WorldBossInfo:getBoxFlag(index)
    if index == 1 then
        return self.svrBoxGot
    elseif index == 2 then
        return self.speedBoxGot
    elseif index == 3 then
        return self.guildBoxGot
    end
end

return WorldBossInfo
